In image compressing methods, such as MPEG-1, MPEG-2, and MPEG-4 H.264/MPEG-4 advanced video coding (AVC), an image is divided into a plurality of blocks having predetermined sizes, and then residual data of the blocks are obtained via inter prediction or intra prediction. The residual data is compressed via transformation, quantization, scanning, run length coding, and entropy encoding. During the entropy encoding, a bitstream is output by entropy encoding syntax elements, such as discrete cosine transform (DCT) coefficients or motion vectors. In terms of a decoder, syntax elements are extracted from a bitstream, and decoding is performed based on the extracted syntax elements.